﻿using System;
using System.Collections.Generic;
using LiteDB;

namespace DevelopTool.Model.AssemblyyModels
{
    /// <summary>
    /// 程序集实体
    /// </summary>
    public class Assemblyy : BaseModel
    {
        /// <summary>
        /// 程序集名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 文件标记值
        /// </summary>
        public string Sign { get; set; }


        /// <summary>
        /// 已压缩的程序集内容集合
        /// </summary>       
        public byte[] ContentsByte { get; set; }


        /// <summary>
        /// 程序集内容集合，不存数据库
        /// </summary>
        [BsonIgnore]
        public List<AssemblyyContent> Contents { get; set; }


        /// <summary>
        /// 程序集路径，不存数据库
        /// </summary>
        [BsonIgnore]
        public string Path { get; set; }

        /// <summary>
        /// 匹配方式，不存数据库
        /// </summary>
        [BsonIgnore]
        public string MatchType { get; set; }

    }

    [Serializable]
    public class AssemblyyContent
    {
        /// <summary>
        /// 类型名
        /// </summary>
        public string TypeName { get; set; }

        /// <summary>
        /// 内容文本
        /// </summary>
        public string Text { get; set; }
    }
}
